#!/usr/bin/env python

import sys, os
from transaction_class import Transaction
def init ( l, admin = 0 ):
	from liwe import parts
	from transaction_class import Transaction

	Transaction ( l )

	l.layman.add_js ( "modules/transaction/js/transaction.js" )
	l.layman.add_js_code ( "transaction.init ();" )

	if admin:
		parts.add ( l.layman, [ "form", "jconed" ] )
		l.layman.add_css ( "modules/transaction/gfx/transaction.admin.css" )
		l.layman.add_js ( "modules/transaction/js/transaction.admin.js" )
		l.layman.add_js_code ( "transaction.admin.init ();" )

	return ''
